package com.lwx.collection;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class CollectionMain<T, T2, T3> {
  public static void main(String[] args) {

  }

  /**
   * 从list中随机取count个元素
   * 
   * @author liangwenxin
   * @param count
   * @return
   */
  public List<T> random(List<T> list, int count) {
    List<T> resultList = new ArrayList<T>();
    for (int i = 0; i < count; i++) {
      int random = MathUtil.random(0, list.size());

      resultList.add(list.get(random));
      list.remove(random);
    }
    return resultList;
  }

  public Map<T, T2> random() {
    return null;

  }
}
